layui.define(['laytpl', 'layer', 'element', 'util'], function(exports){
	exports('setter', {
		//容器ID
		container: 'blog_app',
		base: layui.cache.base, // 记录layuiAdmin文件夹所在路径
		views: './',  // 视图所在目录
		entry: 'index', // 默认视图文件名
		engine: '.html', // 视图文件后缀名
		pageTabs: false,// 是否开启页面选项卡功能。单页版不推荐开启
		name: '云中白鹤',
		tableName: 'blog', //本地存储表名
		MOD_NAME: 'blog', //模块事件名
		debug: true, //是否开启调试模式。如开启，接口异常时会抛出异常 URL 等信息
		interceptor: false, //是否开启未登入拦截
		//自定义请求字段
		request: {
			tokenName: 'access_token' //自动携带 token 的字段名。可设置 false 不携带。
		},
		//自定义响应字段
		response: {
			statusName: 'code', //数据状态的字段名称
			statusCode: {
				ok: 0, //数据状态一切正常的状态码
				logout: 1001 //登录状态失效的状态码
			},
			msgName: 'msg', //状态信息的字段名称
			dataName: 'data' //数据详情的字段名称
		}
		//独立页面路由，可随意添加（无需写参数）
		,
		indPage: [
			'/user/login', //登入页
			'/user/reg', //注册页
			'/user/forget', //找回密码
			'/template/', //独立页的一个测试 demo
		],
		//扩展的第三方模块
		extend: [
			'echarts', //echarts 核心包
			'echartsTheme' //echarts 主题
		],
		//主题配置
		theme: {
			//内置主题配色方案
			color: [
				{main: '#20222A', selected: '#009688', alias: 'default'},
				{main: '#03152A', selected: '#3B91FF', alias: 'dark-blue'},
				{main: '#2E241B', selected: '#A48566', alias: 'coffee'},
				{main: '#50314F', selected: '#7A4D7B', alias: 'purple-red'},
				{main: '#344058', logo: '#1E9FFF', selected: '#1E9FFF', alias: 'ocean'},
				{main: '#3A3D49', logo: '#2F9688', selected: '#5FB878', alias: 'green'},
				{main: '#20222A', logo: '#F78400', selected: '#F78400', alias: 'red'},
				{main: '#28333E', logo: '#AA3130', selected: '#AA3130', alias: 'fashion-red'},
				{main: '#24262F', logo: '#3A3D49', selected: '#009688', alias: 'classic-black'},
				{logo: '#226A62', header: '#2F9688', alias: 'green-header'},
				{main: '#344058', logo: '#0085E8', selected: '#1E9FFF', header: '#1E9FFF', alias: 'ocean-header'},
				{header: '#393D49', alias: 'classic-black-header'},
				{main: '#50314F', logo: '#50314F', selected: '#7A4D7B', header: '#50314F', alias: 'purple-red-header'},
				{main: '#28333E', logo: '#28333E', selected: '#AA3130', header: '#AA3130', alias: 'fashion-red-header'},
				{main: '#28333E', logo: '#009688', selected: '#009688', header: '#009688', alias: 'green-header'}
			],
			//初始的颜色索引，对应上面的配色方案数组索引
			//如果本地已经有主题色记录，则以本地记录为优先，除非请求本地数据（localStorage）
			initColorIndex: 0
		},
		renderMd: function(){
			return 'editormd.markdownToHTML(\'doc_content\', {' +
				'htmlDecode: \'style,script,iframe\',' +
				'emoji: true,' +
				'taskList: true,' +
				'tocm: true,' +
				'tex: true,' +
				'flowChart: true,' +
				'sequenceDiagram: true,' +
				'codeFold: true' +
				'})';
		},
	});
});